package me.keiwu.admin.domain.user;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import me.keiwu.admin.domain.AbstractBaseEntity;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.Email;
import org.springframework.data.domain.Page;

import javax.persistence.*;
import javax.validation.constraints.Size;


@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@DynamicUpdate
public class Label extends AbstractBaseEntity{

    @Id
    @GeneratedValue
    private Long id;

    @Size(min = 1, max = 50)
    @Column(name = "label_name")
    private String labelName;

    @Transient
    Page<UserLabel> userLabelPage;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLabelName() {
        return labelName;
    }

    public void setLabelName(String labelName) {
        this.labelName = labelName;
    }

    public Page<UserLabel> getUserLabelPage() {
        return userLabelPage;
    }

    public void setUserLabelPage(Page<UserLabel> userLabelPage) {
        this.userLabelPage = userLabelPage;
    }
}
